<?php
header("content-type:text/html;charset=utf-8");
include ("conn.php");
//$id=$_POST['id'];
$papername=$_POST['papername'];
$papernum=$_POST['papernum'];
$journalclass=$_POST['journalclass'];
$neirong=$_POST['neirong'];
$lastdate=$_POST['lastdate'];

$sql="insert into lw(papername,papernum,journalclass,neirong,lastdate) values('$papername','$papernum','$journalclass','$neirong','$lastdate')";
//$res=mysqli_query($conn,$sql);
$res=$conn->query($sql);
if($res){
    echo "<script>alert('添加成功');location.href='thesislist.php';</script>";
}else{
    echo "<script>alert('提交失败！');</script>";
}
